package com.xmy.cultivate.mapper;

import com.xmy.cultivate.entity.ChangeSchoolDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

/**
 * <p>
 * 转校详情 Mapper 接口
 * </p>
 *
 * @author hpiggy
 * @since 2024-04-06
 */
public interface ChangeSchoolDetailMapper extends BaseMapper<ChangeSchoolDetail> {

    @Select({"<script>",
            "select * from change_school_detail where id = ${id}",
            "</script>"})
    @Results({
            @Result(column = "id",property = "id"),
            @Result(
                    property = "changeSchool",
                    column = "change_school_id",
                    one = @One(select = "com.xmy.cultivate.mapper.ChangeSchoolMapper.getById")
            )
    })
    public ChangeSchoolDetail getOneInfo(@Param("id") Long id);
}
